# 列表生产式 List Comprehensions
# 生成[1*1,2*2,...]
l = [x * x for x in range(1, 11)]

# 列表生成式加上判断
l1 = [x * x for x in range(1, 11) if x%2 == 0]

# 双层循环, 生成全排列
l2 = [m + n for m in 'abcdef' for n in '1236']

# 将列表中的元素变成小写
l3 = ['Hello', 'World', "Python"]
[x.lower() for x in l3]